### method 1

#INCLUDE_DIRECTORIES(/usr/include)
#ADD_EXECUTABLE(curltest main.c)
#TARGET_LINK_LIBRARIES(curltest curl)


### method 2

FIND_PACKAGE(CURL)
IF(CURL_FOUND)
    INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
    ADD_EXECUTABLE(curltest main.c)
    TARGET_LINK_LIBRARIES(curltest ${CURL_LIBRARY})
ELSE()
    MESSAGE(FATAL_ERROR "CURL library not found")
ENDIF()
